{include file="header.html"}
<link href="/style/forum.css" rel="stylesheet" type="text/css" />
<script charset="utf-8" src="/js/kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="/js/kindeditor/zh_CN.js"></script>
<div class="fmain">
    {if !empty($msg)}
    <p style="color:green">{$msg}</p>
    {/if}
    <div class="fsearch">
        <a href="/forum/" class="likebutton">返回论坛首页</a>
        <form method="post" action="/forum/post">
            <div class="fpost" style="text-align: left;">
                <table>
                    <tr><td width="200px" style="text-align: center;">主题:</td>
                        <td><input type="text"  style="width: 400px" name="title"/></td></tr>
                    <tr><td style="text-align: center;">内容:</td><td>
                            <textarea name="content" style="width:780px;height:400px"></textarea>
                        </td></tr>
                    <tr><td colspan="2" style="text-align: center">
                            <a href="javascript:;" class="likebutton" onclick="fpost(this)">发表帖子</a>
                        <input type="submit" style="display:none"/></td></tr>
                </table>
            </div>
        </form>
    </div>
</div>
{literal}
<script>
    var editor;
    KindEditor.ready(function(K) {
        editor = K.create("[name='content']",{
            uploadJson: "/ajax/upload",
            items:['undo', 'redo', '|', 'justifyleft', 'justifycenter', 'justifyright',
                'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
                'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen','|',
                'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
                'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image',
                'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'map', 'code', 'pagebreak',
                'link', 'unlink', 
            ]
        });
    });
    function fpost(t){
        $(t).siblings("input[type='submit']").click();
        //$(t).parents("form").submit();
    }
</script>
{/literal}
{include file="footer.html"}